#ifndef Common_h__
#define Common_h__

struct GameConfig {
    const char* title;

    int clientWidth;
    int clientHeight;
    int bpp;
    int multiSample;
    int refreshRate;
};

class Common {
public:
    virtual void    Init( int argc, const char** argv, const char* cmdLine ) = 0;
    virtual void    Shutdown() = 0;

    virtual void    Frame() = 0;

    int             GetClientWidth() const { return config.clientWidth; }
    int             GetClientHeight() const { return config.clientHeight; }

    virtual void    RedirectOnRenderSystem( bool on = false ) = 0;

    virtual void    Printf( const char *fmt, ... ) = 0;
    virtual void    Error( const char *fmt, ... ) = 0;
    virtual void	Warning( const char *fmt, ... ) = 0;
    virtual void    FatalError( const char* fmt, ...) = 0;

    virtual void    Printf( const wchar_t *fmt, ... ) = 0;
    virtual void    Error( const wchar_t *fmt, ... ) = 0;
    virtual void	Warning( const wchar_t *fmt, ... ) = 0;
    virtual void    FatalError( const wchar_t* fmt, ...) = 0;

protected:

    GameConfig      config;
};

extern Common*  common;

#endif // Common_h__